#pragma once

#include <cv.h>

/** Line (Segment)
 * 
 * Two different internal presentations: <rho, theta> and <pt1, pt2>
 * 
 */
class Line {
public:
	/** Init with rho and theta, need to compute two end points intersect at the image boundary
	 *
	 */
	Line();
	Line(double rho, double theta, const CvSize& imSize);

	/** Init with two end points, need to compute rho and theta
	 *
	 */
	Line(const CvPoint2D32f& pt1, const CvPoint2D32f& pt2);

	virtual ~Line(void);

public:
	double getTheta() const { return theta; }

	CvPoint2D32f getPoint1() const { return pt1; }
	CvPoint2D32f getPoint2() const { return pt2; }

private:
	double rho;
	double theta;

	//end points
	CvPoint2D32f pt1;
	CvPoint2D32f pt2;
};
